reduce complexity of gdb waypt searchs from O(n^2) to O(n) (#1141)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Thu, 20 Jul 2023 20:45:02 +0000 (14:45 -0600)
committerGitHub <noreply@github.com>
Thu, 20 Jul 2023 20:45:02 +0000 (14:45 -0600)
commit13a4f5e4b7b49e2aee0b139ab7ad93bba64185d4
tree646a1b4583ab20f5d86da092ad3133adf7e4de58
parentd76febd3629f13da33ad7563113d7e6be771db99
reduce complexity of gdb waypt searchs from O(n^2) to O(n) (#1141)

* use QHash for gdb waypoint searches.

This reduces the complexity from O(n^2) to O(n).

For the reader two parallel hashes are maintained with different
keys but identical values.  This is necessary because sometimes
we want to match the name and position, and other times we just want
to match the name.

* workaround missing qHashMulti in Qt5.

and supply missing default for our qHash functions.

* fix MSVC C2666 errors due to an erroneous assumption.

In Qt6 the return type of qHash, and the type of the seed,
happens to be the same as QHash::size_type.
However, this isn't true in Qt5.
defs.h
gdb.cc
gdb.h